﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Hotel.IRepository.Migrations
{
    public partial class Ip : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "GoodsLabels",
                columns: table => new
                {
                    GoodsLabelId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GoodsLabelName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
                    IsDel = table.Column<int>(type: "int", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoodsLabels", x => x.GoodsLabelId);
                });

            migrationBuilder.CreateTable(
                name: "Googds",
                columns: table => new
                {
                    GoodsId = table.Column<long>(type: "bigint", nullable: false),
                    GoodsName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
                    GoodsPrice = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    GoodsTypeId = table.Column<int>(type: "int", nullable: false),
                    GoodsLabel = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsImages = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsDesc = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    GoodsDetail = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    IsDel = table.Column<int>(type: "int", nullable: false),
                    Status = table.Column<int>(type: "int", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Googds", x => x.GoodsId);
                });

            migrationBuilder.CreateTable(
                name: "GoogdsTypes",
                columns: table => new
                {
                    GoodsTypeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    GoogdsTypeName = table.Column<int>(type: "int", maxLength: 50, nullable: false),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    IsDel = table.Column<int>(type: "int", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoogdsTypes", x => x.GoodsTypeId);
                });

            migrationBuilder.CreateTable(
                name: "HotelTests",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FirstValue = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    SecondValue = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    InsertDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Status = table.Column<int>(type: "int", nullable: false),
                    IsDel = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_HotelTests", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Users",
                columns: table => new
                {
                    U_Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    U_Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    U_Pwd = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Users", x => x.U_Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "GoodsLabels");

            migrationBuilder.DropTable(
                name: "Googds");

            migrationBuilder.DropTable(
                name: "GoogdsTypes");

            migrationBuilder.DropTable(
                name: "HotelTests");

            migrationBuilder.DropTable(
                name: "Users");
        }
    }
}
